<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
        <title>收到的留言列表</title>
        <jsp:include page="../lbi/css.jsp"></jsp:include>
        <link rel="stylesheet" href="<c:url value="/static/css/member.css"/>"/>
        <link rel="stylesheet" href="<c:url value="/static/layui/css/layui.css"/>" />
    </head>
    <body>  
        <div class="wrap">
            <!-- 头部开始-->
            <header>
                <div class="header common">
                    <ul class="left fl">
                        <li class="commones">
                            <a class="fl" href="#">欢迎您！</a>
                        </li>
                        <li class="name">
                            <!--登录前显示请登录-->
                            <a href="view/user/login.html" class="selected-color">请登录</a>

                            <!--登录后显示请用户信息-->
                            <!--<a href="users/personal.html">这名字还行</a>
                            -->
                        </li>
                        <li>或</li>
                        <li class="register">
                            <a href="#"><span class="selected-color">轻松注册</span></a>
                        </li>
                    </ul>

                    <ul class="right fr">
                        <li>
                            <a href="#">买家中心</a><b class="icon"></b>
                            <ul>
                                <li>
                                    <a href="users/collect.html">商品收藏</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <a href="#">卖家中心</a><b class="icon"></b>
                            <ul>
                                <li>
                                    <a href="users/company-enter.html">商家入驻</a>
                                </li>
                            </ul>

                        </li>
                        <li class="message">
                            <a href="#">消息（<span class="warn-color">10</span>）</a><b class="icon"></b>
                            <ul>
                                <li>
                                    <a href="#">新消息</a>
                                </li>
                                <li class="icon">
                                    <a href="#"> 您今天还有1次签到的机会，查看详情 副本</a>
                                </li>
                                <li class="icon">
                                    <a href="#">您今天还有1次签到的机会，查看详情 副本</a>
                                </li>
                                <li>
                                    <a href="messages.html">查看全部消息</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <a href="#">在线客服</a><b class="icon"></b>
                            <ul>
                                <li>
                                    <a href="#">QQ客服</a>
                                </li>
                            </ul>
                        </li>
                    
                    </ul>
                </div>
            </header>

            <!--导航开始-->
            <nav class="nav">
                <div class="common nav_bottom">
                    <div class="left fl logo"><img src="../static/img/logo.png"></div>
                    <div class="center fl">
                        <ul class="fl">
                            <li>
                                <a href="#">首页</a>
                            </li>
                            <li class="selected-color">
                                <a href="#">买方中心</a>
                            </li>

                            <li>
                                <a href="#">卖方中心</a>
                            </li>
                            <li>
                                <a href="#">账户管理</a>
                            </li>
                            <li>
                                <a href="#">供应链中心</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>
            <div class="nav_bottom common"></div>
            <div class="main common clearfix">
                <!-- 工作台开始 -->
                <jsp:include page="../lbi/workbench.jsp"></jsp:include>
                <!-- 工作台结束 -->
                <div class="right-content fr">
                    <!--<div class="no-match tc fz14">
                        <br/><br/>
                        <img src="../../../../static/img/warn-icon.png">&nbsp;&nbsp;&nbsp;&nbsp;您尚未发布任何求购信息<br/>
                        <br/><br/>
                        <p class="fz14">发布求购信息，吸引卖家供应、报价、达成交易，试一试：<a class="selected-color">立即发布求购信息</a></p>
                        <br/><br/>
                        <ul class="fb-process clearfix">
                            <li><a class="fl">发布现货求购</a></li><li><a class="fl">卖家主动报价</a></li><li><a class="fl">确认报价</a></li><li><a class="fl">交易达成</a></li>
                        </ul>
                        <br/><br/>
                    </div>-->
                    <div class="yes-match">
                        <div class="status-select">
                            <div  class="record-tab">
                                <table>
                                    <tr><th class="active"><a>收到的留言</a></th><th><a href="postMessage.html">发出的留言</a></th></tr>
                                </table>
                            </div>
                            <div class="status-content">
                                <table>
                                    <thead>
                                        <tr>
                                            <th width="20%">标题</th>
                                            <th width="12.5%">类型</th>
                                            <th width="12.5%">发件人 </th>
                                            <th width="15%">联系方式</th>
                                            <th width="20%">发送时间</th>
                                            <th width="20%">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><span class="ellipsis w160">我有20吨废纸箱、废纸板供应</span></td>
                                            <td>供应询盘</td>
                                            <td>张三</td>
                                            <td>18145256666</td>
                                            <td>2018.06.02   14:20:34</td>
                                            <td class="selected-color"><a>回复留言</a><a>查看详情</a></td>
                                        </tr>
                                        <tr>
                                            <td><span class="ellipsis w160">我有20吨废纸箱、废纸板供应</span></td>
                                            <td>供应询盘</td>
                                            <td>张三</td>
                                            <td>18145256666</td>
                                            <td>2018.06.02   14:20:34</td>
                                            <td class="selected-color"><a>回复留言</a><a>查看详情</a></td>
                                        </tr>
                                        <tr>
                                            <td><span class="ellipsis w160">我有20吨废纸箱、废纸板供应</span></td>
                                            <td>供应询盘</td>
                                            <td>张三</td>
                                            <td>18145256666</td>
                                            <td>2018.06.02   14:20:34</td>
                                            <td class="selected-color"><a>回复留言</a><a>查看详情</a></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="page">
                            <div class="tc" id="pagination"></div>
                        </div>
                    </div>
                </div>
            </div>

            <footer class="common">
                <div class="footer-top">
                    <ul>
                        <li class="plqq">
                            <span class="icon"></span>
                            <h1>品种规格齐全</h1>
                        </li>
                        <li class="zzbz">
                            <span class="icon"></span>
                            <h1>质量可靠保障</h1>
                        </li>
                        <li class="jgyz">
                            <span class="icon"></span>
                            <h1>价格占有优势</h1>
                        </li>
                        <li class="qqbt">
                            <span class="icon"></span>
                            <h1>缺钱可打白条</h1>
                        </li>
                        <li class="mfzc">
                            <span class="icon"></span>
                            <h1>免费找货找车</h1>
                        </li>
                    </ul>
                </div>
                <div class="footer-bottom">
                    <h1 class="common tc">Copyright©right;2018 www.zaishengwang.com Inc. All rights reserved</h1>
                    <h2 class="common tc">苏ICP证161025号 | 苏ICP备15001001号 | 再生网</h2>
                </div>
            </footer>
        </div>
        <script type="text/javascript" src="<c:url value="/static/layui/layui.all.js"/>"></script>
        <script type="text/javascript">
                function getListData(currPage,size){
                    console.log("-----",currPage)
                        getRequest = GetRequest();
                        currPage = getRequest.currPage;
                        console.log(currPage);
                            paged(currPage,10,30);
                          };
                
                function paged(currPage,size,pageCount){
                //分页效果
                layui.use(['laypage', 'layer'], function() {
                var laypage = layui.laypage,
                    layer = layui.layer;

                //完整功能
                laypage.render({
                    elem: 'pagination',
                    count: pageCount,//数据总数
                    limit:10,//每页显示数据
                    curr:currPage,
                    layout: ['count','limit', 'prev', 'skip', 'next','refresh'],
                    prev: '<em>←</em>',
                    next: '<em>→</em>',
                    jump: function(obj,first) {
                         //currPage =obj.curr;
                        
                        if(!first){ //点击跳页触发函数自身，并传递当前页：obj.curr  ajax 再次请求
                          window.location.href = '?currPage='+ obj.curr; 
                          //getListData(currPage,10);
                         
                        }

                    }
                });
            }) 
            };
            
            function GetRequest() {
                    var url = location.search; //获取url中"?"符后的字串
                    var theRequest = new Object();
                    if(url.indexOf("?") != -1) {
                        var str = url.substr(1);
                        strs = str.split("&");
                        for(var i = 0; i < strs.length; i++) {
                            theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                        }
                    }
                    return theRequest;
                }
       
            $(document).ready(function(){
                    getListData(1,10);      
                
            })
        </script>
    </body>
</html>
